package com.huanxing.cloud.security.annotation;

import com.huanxing.cloud.security.config.HxResourceServerAutoConfiguration;
import com.huanxing.cloud.security.config.HxSecurityBeanDefinitionRegistrar;
import org.springframework.context.annotation.Import;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;

import java.lang.annotation.*;

/**
 * 资源服务注解
 *
 * @author lijx
 * @since 2022/5/19 15:18
 */
@Documented
@Inherited
@EnableResourceServer
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@EnableGlobalMethodSecurity(prePostEnabled = true)
@Import({HxResourceServerAutoConfiguration.class, HxSecurityBeanDefinitionRegistrar.class})
public @interface HxEnableResourceServer {
}
